package com.zh.controller.getui;

import com.zh.pojo.dto.UploadDto;
import com.zh.result.JSONResult;
import com.zh.service.IGeTuiService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * 消息推送
 */
@RestController
@RequestMapping("/getui")
public class GeTuiController {
    @Autowired
    private IGeTuiService getuiService;

    /**
     * 绑定个推
     *
     * @param cid
     * @return
     */
    @Operation(summary = "乘客消息推送", description = "乘客消息推送")
    @Parameter(name = "cid", description = "绑定的对象", required = true)
    // 此接口加上了 @SaIgnore 可以游客访问
    @PostMapping("/bind/{cid}")
    public JSONResult bind(@PathVariable String cid) {
        getuiService.bind(cid);
        return JSONResult.success();
    }
}


